package com.docmanage.am.mapper;

import com.docmanage.am.domain.AmAuthRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 按角色授权Mapper接口
 * 
 * @author pointLion
 * @date 2023-07-10
 */
public interface AmAuthRoleMapper 
{
    /**
     * 查询按角色授权
     * 
     * @param id 按角色授权主键
     * @return 按角色授权
     */
    public AmAuthRole selectAmAuthRoleById(Long id);

    /**
     * 查询按角色授权列表
     * 
     * @param amAuthRole 按角色授权
     * @return 按角色授权集合
     */
    public List<AmAuthRole> selectAmAuthRoleList(AmAuthRole amAuthRole);

    /**
     * 新增按角色授权
     * 
     * @param amAuthRole 按角色授权
     * @return 结果
     */
    public int insertAmAuthRole(AmAuthRole amAuthRole);

    /**
     * 修改按角色授权
     * 
     * @param amAuthRole 按角色授权
     * @return 结果
     */
    public int updateAmAuthRole(AmAuthRole amAuthRole);

    /**
     * 删除按角色授权
     * 
     * @param id 按角色授权主键
     * @return 结果
     */
    public int deleteAmAuthRoleById(Long id);

    /**
     * 批量删除按角色授权
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAmAuthRoleByIds(Long[] ids);

    /****
     * 删除某一目录下的所有权限
     * @param cpath
     * @return
     */
    public int deleteByAllotFolder(@Param("cpath") String cpath);


    public int batchInsert(List<AmAuthRole> list);



    public List<AmAuthRole> listAuthFolder(@Param("roleId") Long roleId);
}
